#include "bsp.h"

#include "rtthread.h"

#define THREAD_STACK_SIZE       512
#define THREAD_PRIORITY         25
#define THREAD_TIMESLICE        5

static rt_thread_t tid1 = RT_NULL;

void Task_LED(void *arg){
	while(1)
	{
		GPIO_ResetBits(GPIOF,GPIO_Pin_9);
		rt_thread_delay(500);
		GPIO_SetBits(GPIOF,GPIO_Pin_9);
		rt_thread_delay(500);
	}
}

int main(void)
{   
		bsp_init();
		rt_kprintf("hello RT-Thread!\n");
		tid1 = rt_thread_create("led task",Task_LED,RT_NULL,THREAD_STACK_SIZE,THREAD_PRIORITY,THREAD_TIMESLICE);
	
		if (tid1 != RT_NULL)
        rt_thread_startup(tid1);
		
		return 0;
}
